package com.yilin.tms.core.entity.user.account;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.tms.core.commons.base.BaseOrganizeEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "advance_money")
@TableName(value = "advance_money")
public class AdvanceMoney extends BaseOrganizeEntity {

    public enum ExpenseType {
        vehicle(0, "车辆支出"),
        oill(1, "油费"),
        travel(2, "差旅费用"),
        office(3, "办公费用"),
        integral(5, "油卡积分"),
        other(6, "其他");
        @EnumValue
        public Integer index;
        public String name;

        ExpenseType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    public enum AdvanceType {
        income(0, "收入"),
        expenditure(1, "支出");
        @EnumValue
        public Integer index;
        public String name;

        AdvanceType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    public enum AdvanceState {
        create(0, "创建中"),
        audting(1, "审核中"),
        success(2, "付款成功");
        @EnumValue
        public Integer index;
        public String name;

        AdvanceState(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    @Column(name = "advance_no")
    private String advanceNo;//订单号
    @Column(name = "expense_type")
    private ExpenseType expenseType;//费用类型
    @Column(name = "account_id")
    private String accountId;
    @Column(name = "account_name")
    private String accountName;
    @Column(name = "truck_id")
    private String truckId;//车辆
    @Column(name = "truck_no")
    private String truckNo;//车辆
    @Column(name = "advance_type")
    private AdvanceType advanceType;//交易类型
    @Column(name = "advance_state")
    private AdvanceState advanceState;//交易状态
    @Column(name = "monery")
    private Double monery;//交易总金额
    @Column(name = "other_cost_remark")
    private String otherCostRemark; //金额说明
    @Column(name = "other_cost_img_url")
    private String otherCostImgUrl; //金额图片，，，
    @Column(name = "auditing_id")
    private String auditingId; //审核人ID
    @Column(name = "auditing_name")
    private String auditingName; //名称
    @Column(name = "auditing_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditingDate; //名称
    @Column(name = "res_msg")
    private String resMsg; //退回说明

    public String getAdvanceNo() {
        return advanceNo;
    }

    public void setAdvanceNo(String advanceNo) {
        this.advanceNo = advanceNo;
    }

    public ExpenseType getExpenseType() {
        return expenseType;
    }

    public void setExpenseType(ExpenseType expenseType) {
        this.expenseType = expenseType;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getResMsg() {
        return resMsg;
    }

    public void setResMsg(String resMsg) {
        this.resMsg = resMsg;
    }

    public String getAuditingId() {
        return auditingId;
    }

    public void setAuditingId(String auditingId) {
        this.auditingId = auditingId;
    }

    public String getAuditingName() {
        return auditingName;
    }

    public void setAuditingName(String auditingName) {
        this.auditingName = auditingName;
    }

    public Date getAuditingDate() {
        return auditingDate;
    }

    public void setAuditingDate(Date auditingDate) {
        this.auditingDate = auditingDate;
    }

    public String getTruckId() {
        return truckId;
    }

    public void setTruckId(String truckId) {
        this.truckId = truckId;
    }

    public String getTruckNo() {
        return truckNo;
    }

    public void setTruckNo(String truckNo) {
        this.truckNo = truckNo;
    }

    public AdvanceType getAdvanceType() {
        return advanceType;
    }

    public void setAdvanceType(AdvanceType advanceType) {
        this.advanceType = advanceType;
    }

    public AdvanceState getAdvanceState() {
        return advanceState;
    }

    public void setAdvanceState(AdvanceState advanceState) {
        this.advanceState = advanceState;
    }

    public Double getMonery() {
        return monery;
    }

    public void setMonery(Double monery) {
        this.monery = monery;
    }

    public String getOtherCostRemark() {
        return otherCostRemark;
    }

    public void setOtherCostRemark(String otherCostRemark) {
        this.otherCostRemark = otherCostRemark;
    }

    public String getOtherCostImgUrl() {
        return otherCostImgUrl;
    }

    public void setOtherCostImgUrl(String otherCostImgUrl) {
        this.otherCostImgUrl = otherCostImgUrl;
    }
}
